/**
 * @param {number[]} nums
 * @return {number}
 */
var findLengthOfLCIS = function(nums) {
  let count = 1, result = 1;
  for(let i = 1; i < nums.length; i++) {
    if(nums[i] > nums[i - 1]) {
      count++;
      result = Math.max(result, count);
    } else {
      count = 1;
    }
  }
  return result;
};
let nums = [1,3,5,4,7];
console.log(findLengthOfLCIS(nums));
nums = [2,2,2,2,2];
console.log(findLengthOfLCIS(nums));
